package net.schmurgon.gwt.request;

import org.springframework.roo.addon.gwt.RooGwtMirroredFrom;
import net.schmurgon.server.domain.Course;
import com.google.gwt.requestfactory.shared.Service;
import com.google.gwt.requestfactory.shared.RecordListRequest;
import com.google.gwt.requestfactory.shared.RecordRequest;
import com.google.gwt.valuestore.shared.PropertyReference;
import com.google.gwt.requestfactory.shared.RequestObject;
import com.google.gwt.requestfactory.shared.Instance;
import net.schmurgon.gwt.request.CourseRecord;

@RooGwtMirroredFrom(Course.class)
@Service(Course.class)
public interface CourseRequest {

    abstract RecordListRequest<net.schmurgon.gwt.request.CourseRecord> findAllCourses();

    abstract RecordRequest<net.schmurgon.gwt.request.CourseRecord> findCourse(PropertyReference<Long> id);

    abstract RequestObject<java.lang.Long> countCourses();

    abstract RecordListRequest<net.schmurgon.gwt.request.CourseRecord> findCourseEntries(int firstResult, int maxResults);

    @Instance
    abstract RequestObject<java.lang.Void> remove(CourseRecord record);

    @Instance
    abstract RequestObject<java.lang.Void> persist(CourseRecord record);
}
